package cn.iocoder.yudao.module.game.dal.mysql.realtimeUserList;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.game.dal.dataobject.realtimeUserList.RealtimeUserListDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.game.controller.admin.realtimeUserList.vo.*;

/**
 * 实时用户列 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface RealtimeUserListMapper extends BaseMapperX<RealtimeUserListDO> {

    default PageResult<RealtimeUserListDO> selectPage(RealtimeUserListPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<RealtimeUserListDO>()
                .eqIfPresent(RealtimeUserListDO::getMemberId, reqVO.getMemberId())
                .likeIfPresent(RealtimeUserListDO::getMemberName, reqVO.getMemberName())
                .eqIfPresent(RealtimeUserListDO::getPassword, reqVO.getPassword())
                .eqIfPresent(RealtimeUserListDO::getVipLevel, reqVO.getVipLevel())
                .eqIfPresent(RealtimeUserListDO::getSurplusGold, reqVO.getSurplusGold())
                .eqIfPresent(RealtimeUserListDO::getStatus, reqVO.getStatus())
                .eqIfPresent(RealtimeUserListDO::getRemark, reqVO.getRemark())
                .eqIfPresent(RealtimeUserListDO::getIpAddress, reqVO.getIpAddress())
                .eqIfPresent(RealtimeUserListDO::getEquipmentInfo, reqVO.getEquipmentInfo())
                .betweenIfPresent(RealtimeUserListDO::getLastLoginTime, reqVO.getLastLoginTime())
                .eqIfPresent(RealtimeUserListDO::getAgentTeam, reqVO.getAgentTeam())
                .likeIfPresent(RealtimeUserListDO::getSalesmanName, reqVO.getSalesmanName())
                .betweenIfPresent(RealtimeUserListDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(RealtimeUserListDO::getId));
    }

}